package Day08;

import javax.imageio.metadata.IIOMetadataFormatImpl;
import java.util.ArrayList;

public class Text {

    public static void main(String[] args) {
        ArrayList<Student> lsit = new ArrayList<>();

        Student s1 = new Student("zhangsan" ,23);
        Student s2 = new Student("lisi" ,24);
        Student s3 = new Student("wangwu" ,225);

        lsit.add(s1);
        lsit.add(s2);
        lsit.add(s3);

        for (int i = 0; i < lsit.size(); i++) {
            Student stu = lsit.get(i);
            System.out.println(stu.getName() + ", " + stu.getAge());
        }

        
    }
   
}
